
class Pingfen {
	private int no;
	private String name;
	private int grade;
	private int finagrade;
	private int max;
	private int min;
	public Pingfen(){
		
	}
	public Pingfen(int no,String name){
		this.no=no;
		this.name=name;
	}
	public int getNo(){
		return no;
	}
	public void setNo(int no){
		this.no=no;
	}
	public String getName(){
		return name;
	}
	public void setName(String name){
		this.name=name;
	}
	public int getGrade(){
		return grade;
	}
	public void setGrade(int grade){
		this.grade=grade;
	}
	public int getFinagrade(){
		return finagrade;
	}
	public void setFinagrade(int finagrade){
		this.finagrade=finagrade;
	}
	public int max(int score[]){
		int max=score[0];
		for(int a=0;a<score.length;a++){
			if(score[a]>max){
				max=score[a];
			}
		}
		return max;
	}
	public int min(int score[]){
		int min=score[0]; 
		for(int b=0;b<score.length;b++){
			if(score[b]<min){
				min=score[b];
			}
		}
		return min;
	}
	public int finagrade(int score[]){
		int finagrade=0;
		for(int i=0;i<score.length;i++){
			finagrade+=score[i];
		}
		finagrade=finagrade-max(score)-min(score);
		return finagrade;
	}
	public String toString(){
		return "×î¸ß·Ö"+max+"×îµÍ·Ö"+min+"×îÖÕµÃ·Ö"+finagrade;
	}
}
